package com.qiaoba.module.system.service.impl;

import com.baomidou.mybatisplus.extension.toolkit.Db;
import com.qiaoba.module.system.entity.SysRoleDept;
import com.qiaoba.module.system.mapper.SysRoleDeptMapper;
import com.qiaoba.module.system.service.SysRoleDeptService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 角色部门关联 服务层实现
 *
 * @author ailanyin
 * @date 2023-09-10 16:37:41
 */
@Service
@RequiredArgsConstructor
public class SysRoleDeptServiceImpl implements SysRoleDeptService {

    private final SysRoleDeptMapper sysRoleDeptMapper;

    @Override
    public void deleteByRoleIds(List<String> ids) {
        sysRoleDeptMapper.deleteByRoleIds(ids);
    }

    @Override
    public void insertBatch(List<SysRoleDept> list) {
        Db.saveBatch(list);
    }
}
